/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tnviet.proj.jna.analyzer;

import jpcap.packet.*;
import tnviet.proj.jna.Program;
import tnviet.proj.jna.utilities.ResourceManager;
/**
 *
 * @author Administrator
 */
public class DNSAnalyzer extends JNPacketAnalyzer {
    private static ResourceManager resourceManager = new ResourceManager(JNPacketAnalyzer.class, Program.locale);
    public DNSAnalyzer () {
        layer = APPLICATION_LAYER;
    }
    public boolean isAnalyzable(Packet p) {
        if (p instanceof UDPPacket &&
                (((UDPPacket)p).src_port == 53 || ((UDPPacket)p).dst_port == 53))
            return true;
        else return false;
    }
    public String getProtocolName() {
        return resourceManager.getString("dns");
    }

    @Override
    public void analyze(Packet p) {
        if(!isAnalyzable(p)) return;
    }

    @Override
    public String[] getValueNames() {
        return null;
    }

    @Override
    public Object getValue(String valueName) {
        return null;
    }

    @Override
    Object getValueAt(int index) {
        return null;
    }

    @Override
    public Object[] getValues() {
        return null;
    }
    @Override
    public String getValueNameAt(int index) {
        return null;
    }


}
